package com.honghu.villagepost.adapter

import com.honghu.villagepost.R
import com.honghu.villagepost.entity.Store
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.honghu.villagepost.util.DensityUtil
import com.honghu.villagepost.util.GlideUtil

/**
 * @author: mqwang
 * @create: 1/27/21 4:06 PM
 * @Description:
 */
class StoreAdapter :BaseQuickAdapter<Store, BaseViewHolder>(R.layout.adapter_store) {

    override fun convert(helper: BaseViewHolder?, item: Store) {
        helper!!.setText(R.id.tv_name, item.name)
        helper!!.setText(R.id.tv_desc, item.intro)
//        helper!!.setText(R.id.tv_rule, item.intro)
        helper!!.setText(R.id.tv_addr, item.address)

        GlideUtil.loadImg(helper.getView(R.id.iv_image), item.logo, DensityUtil.dp2px(6f))

    }

}